import torch


class ZhnNet2(torch.nn.Module):
    def __init__(self):
        super(ZhnNet2, self).__init__()
        self.conv1 = torch.nn.Conv2d(3, 12, kernel_size=(3, 3), padding=1)
        self.conv2 = torch.nn.Conv2d(12, 24, kernel_size=(3, 3), padding=1)
        self.relu = torch.nn.LeakyReLU(negative_slope=0.1)
        self.pool = torch.nn.MaxPool2d(2, stride=2)
        self.linear = torch.nn.Linear(115200, 1)

    def forward(self, x):
        x = self.conv1(x)
        x = self.relu(x)
        x = self.pool(x)
        x = self.conv2(x)
        x = self.relu(x)
        x = self.pool(x)
        x = x.view(-1)
        x = self.linear(x)
        return x
